package cloudPayAdmin.admin.dbapp.repo.traffic;

import cloudPayAdmin.admin.dbapp.entity.traffic.TTrafficMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface TrafficMessageRepo extends JpaRepository<TTrafficMessage, Long>, JpaSpecificationExecutor<TTrafficMessage> {

    List<TTrafficMessage> findByDetectorIdAndEnable(Long detectorId, Boolean enable);

    List<TTrafficMessage> findByDetectorIdAndEnableAndStartTimeBetween(Long detectorId, Boolean enable, String startTimeBegin, String startTimeEnd);
}
